import UIKit
extension UIAlertController {
    
    public static func show(title: String?, message: String?,sureActionTitle: String,cancleActionTitle: String,preferredStyle: UIAlertController.Style = .alert ,sureClosure:@escaping (()->()),cancelClosure: @escaping (()->())) ->UIAlertController{
        let alert = UIAlertController(title: title, message: message, preferredStyle: preferredStyle)
        let cancel = UIAlertAction(title: cancleActionTitle, style: .cancel) { (UIAlertAction) in
            cancelClosure()
        }
        let sure = UIAlertAction(title: sureActionTitle, style: .default) { (UIAlertAction) in
            sureClosure()
        }
        alert.addAction(cancel)
        alert.addAction(sure)
        return alert
    }
    
    public static func show(title: String?, message: String?,sureActionTitle: String,preferredStyle: UIAlertController.Style = .alert ,sureClosure:@escaping (()->())) ->UIAlertController{
        let alert = UIAlertController(title: title, message: message, preferredStyle: preferredStyle)
        let sure = UIAlertAction(title: sureActionTitle, style: .default) { (UIAlertAction) in
            sureClosure()
        }
        alert.addAction(sure)
        return alert
    }
}
